Compression of image data, such as using CCITT G4 binary lossless coding, is common in the context of systems which handle document or image data, such as facsimile machines and digital printing, scanning and copying systems. Whenever raw image data is scanned from an original image, the raw data is typically immediately compressed using a lossless algorithm. Also, when data representative of an image desired to be printed is submitted to a digital printing apparatus, after it is decomposed, the data is typically temporarily re-compressed and retained in memory until a specific page image is required by the printer hardware (e.g., an ink-jet printhead or a modulator in an electrophotographic “laser printer”), at which point it is decompressed and used to operate the printer hardware. And when digital images are exported to the network, they are also typically compressed to reduce the bandwidth used during the transfer.
In certain situations, however, image data sets subjected to well-known compression algorithms will not in fact be compressed to a smaller size; rather, the “compressed” image resulting from application of the algorithm will be larger than the original image data set. In CCITT G4 compression, such a result is likely to occur when the original image to be compressed includes a large number of isolated dots. Such isolated dots tend to result when a mid-tone gray image is converted, earlier in the image's life cycle, to a halftone image with error diffusion or blue noise. It is, therefore, desirable to be able to predict, before a compression technique is applied to an image data set, whether the compression technique will in fact appreciably reduce the size of the data set. If it can be reliably predicted that the compression technique will not appreciably reduce the size of the data set, then the larger system can determine that the image data set should not be submitted to the compression technique.
Another factor in the performance of a digital image-processing system is the time of compressing the image data. Generally, a favorably high compression ratio correlates with a relatively short time required for the compression algorithm to compress the image data. Different kinds of compression techniques may present trade-offs between the resulting compression ratio and the time required to carry out the compression: for example, in many cases, a JBIG2 compression will result in a smaller compressed file than would result from CCITT G4 compression, although the JBIG2 compression often requires more time.